from sqlalchemy import select

from forward.dependencies.database import db
from forward.model.orm.base import BaseORM
from forward.model.schemas.lucky.draw import DrawOutSchema
from forward.model.tables.activity import DrawModel


class DrawORM(BaseORM[DrawOutSchema,]):
    MODEL = DrawModel
    OUT_SCHEMA = DrawOutSchema

    # async def get_one_by_id(self, id: int) -> DrawOutSchema | None:
    #     statement = select(DrawModel).where(DrawModel.id == id)
    #     record = await db.fetch_one(statement)
    #     if not record:
    #         return None
    #     return DrawOutSchema.model_validate(record, from_attributes=True)
